package com.cash.app.ui.other

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import com.cash.app.base.BaseViewModel
import com.cash.app.net.NetRequestExecutor
import com.cash.app.net.RetrofitClient
import com.cash.app.ui.other.api.FeedbackAPIService
import com.cash.app.ui.other.model.FeedbackListResponse

class FeedbackACViewModel : BaseViewModel() {

    private val feedbackAPIService by lazy {
        RetrofitClient.createService(FeedbackAPIService::class.java)
    }

    private val _feedbackList = MutableLiveData<FeedbackListResponse>()
    val feedbackList: LiveData<FeedbackListResponse> = _feedbackList

    fun getFeedbackList() {
        launchRequest(request = {
            NetRequestExecutor.baseNetRequest {
                feedbackAPIService.getFeedbackList()
            }
        }, onSuccess = { response ->
            response?.let {
                _feedbackList.value = it
            }
        })
    }
} 